package com.bluefeather.songlyric;

import android.app.Dialog;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class SearchMusicDlg extends Dialog implements OnClickListener {

	public SearchMusicDlg(SongLyricActivity activity) {
		super(activity);
		_activity = activity;
		setContentView(R.layout.dlg_search);
		_name = (TextView)findViewById(R.id.search_name);
		Button btn = (Button)findViewById(R.id.b_search);
		btn.setOnClickListener(this);
		setTitle(R.string.search_music);
	}
	
	@Override
	public void onClick(View v) {
		String name = _name.getText().toString();
		_activity.searchMusic(name);
		dismiss();
	}
	
	private SongLyricActivity	_activity;
	private TextView			_name;

}
